﻿#include <QCoreApplication>
#include <QString>
#include <QTextStream>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QTextStream in(stdin);
    QTextStream out(stdout);
    QString line;

    out << ">_ " << flush;
    while (in.readLineInto(&line)) {
        if(!line.contains("exit"))
        {
            out << "your word : " + line << endl;
            out << ">_ " << flush;
        }
        else
        {
            out << "now exit" << endl;
            return 0;
        }
    }

    return a.exec();
}
